/* 全局样式 */
.root {
    -fx-font-family: "Arial", sans-serif;
}

/* 背景样式 */
.main-layout, .login-background, .address-selection-background, .register-background, .submit-record-background {
    -fx-background-color: linear-gradient(to bottom, #e6f2ff, #b3d9ff);
}

/* 卡片式容器 */
.main-container, .login-container, .address-selection-container, .register-container, .submit-record-container {
    -fx-background-color: white;
    -fx-background-radius: 10px;
    -fx-padding: 30px;
    -fx-effect: dropshadow(gaussian, rgba(0, 0, 0, 0.1), 10, 0, 0, 5);
}

/* 标题样式 */
.title, .header-title, .menu-title, .login-title, .address-selection-title, .register-title, .submit-record-title {
    -fx-font-weight: bold;
    -fx-text-fill: #343a40;
}

.title, .menu-title, .address-selection-title, .register-title, .submit-record-title {
    -fx-font-size: 20px;
}

.header-title {
    -fx-font-size: 18px;
    -fx-text-fill: white;
}

.login-title, .submit-record-title {
    -fx-padding: 0 0 10px 0;
}

.submit-record-title {
    -fx-alignment: center;
}

/* 按钮样式 */
.header {
    -fx-background-color: #409eff;
    -fx-padding: 10px 20px;
    -fx-effect: dropshadow(gaussian, rgba(0, 0, 0, 0.1), 10, 0, 0, 2);
}

.welcome-label {
    -fx-text-fill: white;
    -fx-padding: 0 10px;
}

.logout-button {
    -fx-background-color: transparent;
    -fx-text-fill: white;
    -fx-padding: 5px 15px;
    -fx-cursor: hand;
    -fx-border-radius: 5px;
    -fx-background-radius: 5px;
}

.logout-button:hover {
    -fx-background-color: rgba(255, 255, 255, 0.1);
}

.refresh-button, .menu-button, .login-button, .register-button,
.verify-button, .save-button, .back-button, .register-button, .submit-button {
    -fx-cursor: hand;
    -fx-background-radius: 5px;
    -fx-transition: all 0.3s ease;
}

.refresh-button {
    -fx-background-color: #007bff;
    -fx-text-fill: white;
    -fx-padding: 5px 15px;
}

.refresh-button:hover {
    -fx-background-color: #0069d9;
}

.menu-button {
    -fx-pref-width: 180px;
    -fx-pref-height: 100px;
    -fx-font-size: 16px;
    -fx-background-color: white;
    -fx-text-fill: #343a40;
    -fx-border-color: #e9ecef;
    -fx-effect: dropshadow(gaussian, rgba(0, 0, 0, 0.1), 5, 0, 0, 3);
    -fx-padding: 10px;
}

.menu-button:hover {
    -fx-background-color: #f8f9fa;
    -fx-effect: dropshadow(gaussian, rgba(0, 0, 0, 0.2), 10, 0, 0, 5);
    -fx-translate-y: -2px;
}

.menu-button:pressed {
    -fx-translate-y: 0px;
}

.login-button, .verify-button, .save-button, .register-button, .submit-button {
    -fx-background-color: #409eff;
    -fx-text-fill: white;
    -fx-pref-height: 40px;
}

.login-button:hover, .verify-button:hover, .save-button:hover, .register-button:hover, .submit-button:hover {
    -fx-background-color: #3a8ee6;
}

.register-button, .back-button {
    -fx-pref-width: 100px;
}

.register-button {
    -fx-background-color: white;
    -fx-text-fill: #409eff;
    -fx-border-color: #409eff;
}

.register-button:hover {
    -fx-background-color: #f5f7fa;
}

.back-button {
    -fx-background-color: #f8f9fa;
    -fx-text-fill: #6c757d;
    -fx-border-color: #e9ecef;
}

.back-button:hover {
    -fx-background-color: #f1f3f5;
}

.submit-button {
    -fx-pref-width: 120px;
    -fx-alignment: center;
    -fx-padding: 8px 15px;
    -fx-font-size: 14px;
}

/* 输入框样式 */
.login-input, .form-control, .feedback-container .form-control {
    -fx-pref-height: 35px;
    -fx-background-color: #f8f9fa;
    -fx-border-color: #e9ecef;
    -fx-border-radius: 5px;
    -fx-padding: 0 10px;
}

.login-input:focused, .form-control:focused, .feedback-container .form-control:focused {
    -fx-border-color: #409eff;
    -fx-focus-color: transparent;
}

.verify-input {
    -fx-pref-width: 150px;
}

.form-label, .aqi-selection-container .form-label-bold {
    -fx-text-fill: #6c757d;
    -fx-padding: 5px 0;
}

.form-label-bold {
    -fx-font-weight: bold;
}

.selected-address {
    -fx-font-weight: bold;
    -fx-text-fill: #343a40;
    -fx-padding: 5px 0;
}

.header-container {
    -fx-background-color: #3498db;
    -fx-padding: 10px;
    -fx-spacing: 5px;
}

.header-top {
    -fx-padding: 5px 15px;
}

.header-bottom {
    -fx-padding: 0px 15px 5px 15px;
}
/* 表格样式 */
.history-table {
    -fx-background-color: white;
    -fx-background-radius: 5px;
    -fx-border-color: #dee2e6;
    -fx-border-radius: 5px;
    -fx-table-cell-border-color: #e9ecef;
}

.history-table .column-header-background {
    -fx-background-color: #e9ecef;
    -fx-background-radius: 5px 5px 0 0;
}

.history-table .column-header {
    -fx-background-color: transparent;
    -fx-padding: 8px 10px;
    -fx-font-weight: bold;
    -fx-text-fill: #495057;
}

.history-table .table-cell {
    -fx-padding: 8px 10px;
    -fx-border-width: 0 0 1px 0;
    -fx-border-color: #e9ecef;
}

.history-table .table-row-cell {
    -fx-cell-size: 36px;
    -fx-background-insets: 0, 0 0 1px 0;
}

.history-table .table-row-cell:odd {
    -fx-background-color: #f8f9fa;
}

.history-table .table-row-cell:selected {
    -fx-background-color: #cce5ff;
    -fx-text-fill: #000;
}

.table-column {
    -fx-alignment: CENTER_LEFT;
}

/* 移除不兼容的 last-child 选择器 */
/* .table-column:last-child { */
/*     -fx-border-width: 0; */
/* } */

/* AQI 等级列特殊样式 */
.aqi-table-column {
    -fx-alignment: CENTER;
}

/* AQI 等级单元格样式 */
.aqi-cell {
    -fx-padding: 3px 6px;
    -fx-background-radius: 4px;
    -fx-text-fill: white;
    -fx-font-weight: bold;
    -fx-alignment: CENTER;
    -fx-min-width: 60px;
}

.aqi-good {
    -fx-background-color: #4CAF50; /* 绿色 */
}

.aqi-moderate {
    -fx-background-color: #FFC107; /* 黄色 */
    -fx-text-fill: #333;
}

.aqi-unhealthy-for-sensitive-groups {
    -fx-background-color: #FF9800; /* 橙色 */
}

.aqi-unhealthy {
    -fx-background-color: #F44336; /* 红色 */
}

.aqi-very-unhealthy {
    -fx-background-color: #9C27B0; /* 紫色 */
}

.aqi-hazardous {
    -fx-background-color: #8B0000; /* 深红色 */
}

/* 其他样式 */
.status-label {
    -fx-text-fill: #6c757d;
    -fx-padding: 5px;
}

.divider {
    -fx-background-color: #e9ecef;
    -fx-padding: 5px 0;
}

.forgot-password {
    -fx-text-fill: #6c757d;
    -fx-cursor: hand;
    -fx-padding: 10px 0 0 0;
}

.forgot-password:hover {
    -fx-text-fill: #409eff;
}

.aqi-info-container {
    -fx-padding: 15px;
    -fx-background-color: #f8f9fa;
    -fx-background-radius: 8px;
    -fx-spacing: 8px;
}

.aqi-info-row {
    -fx-alignment: center-left;
}

.aqi-level {
    -fx-min-width: 30px;
    -fx-alignment: center;
    -fx-font-weight: bold;
}

.aqi-category {
    -fx-min-width: 50px;
    -fx-alignment: center;
}

.aqi-description {
    -fx-text-fill: #6c757d;
}

.aqi-selection-container {
    -fx-spacing: 12px;
}

.aqi-radio-button {
    -fx-padding: 5px 0;
}

.feedback-container .form-control {
    -fx-pref-height: 80px;
}

.back-button {
    -fx-background-color: transparent;
    -fx-text-fill: #343a40;
    -fx-font-size: 14px;
    -fx-padding: 5px 10px;
    -fx-cursor: hand;
    -fx-border-radius: 5px;
}

.back-button:hover {
    -fx-background-color: rgba(0, 0, 0, 0.05);
}